import { NgModule } from '@angular/core';
import { Ng2SmartTableModule } from 'ng2-smart-table';

import { ThemeModule } from '../../@theme/theme.module';
import { LearnRoutingModule, routedComponents } from './learn-routing.module';
import { BasicService } from '../../@core/data/basic.service';
import { NotificationsService } from '../../@core/utils/notifications.service';
import { ToasterModule } from 'angular2-toaster';
import { SweetAlert2Module } from '@toverux/ngx-sweetalert2';
import { CourseModalComponent } from './course/modal/course.modal.component';
import { MyScoreBarComponent } from './myscore/myscore-bar.component';
// echarts
import { NgxEchartsModule } from 'ngx-echarts';
import { MyScoreRoseComponent } from './myscore/myscore-rose.component';
import { HisPaperModalComponent } from './myhispaper/modal/hispaper.modal.component';

const declarationsComponents = [
  CourseModalComponent,
  MyScoreBarComponent,
  MyScoreRoseComponent,
  HisPaperModalComponent,
];

const entryComponents = [
  CourseModalComponent,
  HisPaperModalComponent,
];

@NgModule({
  imports: [
    ThemeModule,
    LearnRoutingModule,
    Ng2SmartTableModule,
    ToasterModule,
    SweetAlert2Module.forRoot({
      type: 'warning',
      // background: '#554db3',
      showCancelButton: true,
      confirmButtonText: '确认',
      cancelButtonText: '取消',
  }),
  NgxEchartsModule,
  ],
  declarations: [
    ...routedComponents,
    ...declarationsComponents,
  ],
  providers: [
    BasicService,
    NotificationsService,
  ],
  entryComponents: [
    ...entryComponents,
  ],
})
export class LearnModule { }
